using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CatalogManagerBL;

namespace CatalogManagerWebApp
{
    public partial class EditCategory : System.Web.UI.Page
    {
        private string CatalogName = string.Empty;
        private CatalogManagerDAL.ListEntities DAL_ListEntities = new CatalogManagerDAL.ListEntities();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(Request.QueryString["CatalogName"]))
            {
                CatalogName = Request.QueryString["CatalogName"];
            }

            if (Page.IsPostBack) return;

            grdList.DataSource = DAL_ListEntities.ListCategories(CatalogName, null).DefaultView;
            grdList.DataBind();
        }

    }
}
